<template>
  <el-card header="版本信息" shadow="hover">
    <div style="height: 210px;text-align: center;">
      <img src="src/assets/images/ver.svg" style="height:140px"/>
      <h2 style="margin-top: 15px;">{{ $CONFIG.APP_NAME + ' ' + $CONFIG.APP_VERSION }}</h2>
      <p style="margin-top: 5px;">最新版本 {{ ver }}</p>
    </div>
    <div style="margin-top: 20px; text-align: center;">
      <el-button plain round type="primary" @click="golog">后端代码地址</el-button>
      <el-button plain round type="primary" @click="gogit">前端代码地址</el-button>
    </div>
  </el-card>
</template>

<script>
module.exports = {
  title: "版本信息",
  icon: "el-icon-monitor",
  description: "当前项目版本信息",
  data() {
    return {
      ver: 'loading...'
    }
  },
  mounted() {
    this.getVer()
  },
  methods: {
    async getVer() {
      this.ver = this.$CONFIG.APP_VERSION
    },
    golog() {
      window.open("https://gitee.com/jichangxiu/Jcx-Boot")
    },
    gogit() {
      window.open("https://gitee.com/jichangxiu/Jcx-Ui")
    }
  }
}
</script>
